<!DOCTYPE html>
<html lang="">

<head>
    <meta charset="utf-8" />
    <meta http-equiv="X-UA-Compatible" content="IE=edge" />
    <meta name="viewport" content="width=device-width,initial-scale=1.0, maximum-scale=1.0, user-scalable=no" />
    <meta http-equiv="pragma" content="no-cache" />
    <meta http-equiv="cache-control" content="no-cache" />
    <title>登陆跳转中</title>
    <meta name="google" value="notranslate" />
    <script>
        const cdnJSON = JSON.parse('<%= htmlWebpackPlugin.options.cdnJSON %>')
        // 获取主题方法
        const getTheme = <%= htmlWebpackPlugin.options.getTheme %>;
        // 获取主题颜色
        const { themeColor } = getTheme('<%= VUE_APP_CDN_PATH %>', cdnJSON['byteluck-theme']['folderPath'])
    </script>

    <!-- 注册css资源 -->
    <% for (var i in htmlWebpackPlugin.options.cdn &&
    htmlWebpackPlugin.options.cdn.css) { %>
    <link rel="stylesheet" href="<%= htmlWebpackPlugin.options.cdn.css[i] %>" />
    <% } %>

    <script
        src="<%= htmlWebpackPlugin.options.okI18n %>"
        data-base-url="<%= BASE_URL %>locales/"
        data-locale-key="locale"
        data-env="<%= NODE_ENV %>"
    ></script>
    <style>
        body {
            overflow: overlay;
            background: var(--bl-n150-c);
        }

        #app {
            height: 100%;
        }
    </style>
</head>

<body>
    <noscript>
        <strong>We're sorry but <%= htmlWebpackPlugin.options.title %> doesn't work
            properly without JavaScript enabled. Please enable it to
            continue.</strong>
    </noscript>
    <div id="app"></div>
    <script>
        // ok-wc-ui 全局配置
        let options = {}

        // sourceHost
        let sourceHost = '<%= VUE_APP_SOURCE_HOST %>'
        if ('<%= NODE_ENV %>' !== 'development') {
            sourceHost = location.origin
        }

        // 国际化
        const cookies = document.cookie
            .split(';')
            .map(v => v.split('='))
            .find(v => v[0].trim() === 'local')
        const locale = cookies ? cookies[1] : 'zh-CN'

        // ok-wc-ui的全局配置
        window.okuiConfig = {
            env: '<%= NODE_ENV %>' === 'development' ? 'DEV' : 'PRD',
            apiPath: '<%= VUE_APP_OK_API_PATH %>',
            options: options,
            cardPath: '<%= VUE_APP_CARD_PATH %>',
            locale: locale, // 国际化
        }
    </script>
     <!-- 注册js资源 -->
     <% for (var i in htmlWebpackPlugin.options.cdn && htmlWebpackPlugin.options.cdn.js) { %>
    <script type="text/javascript" src="<%= htmlWebpackPlugin.options.cdn.js[i] %>"></script>
    <% } %>
</body>

</html>